from pydantic import BaseModel
from typing import Optional

class PriorityBase(BaseModel):
    name: str
    code: str
    module_type: str
    color: Optional[str] = None
    description: Optional[str] = None

class PriorityCreate(PriorityBase):
    pass

class Priority(PriorityBase):
    id: int

    class Config:
        orm_mode = True
